/*
 * 文件名：CommentaryBusinessImpl.java
 * 版权：Copyright 2007-2015 517na Tech. Co. Ltd. All Rights Reserved. 
 * 描述： CommentaryBusinessImpl.java
 * 修改人：yanshu
 * 修改时间：2015年12月24日
 * 修改内容：新增
 */
package com.feichuang.chineseWoodCarving.business.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.better517na.javaKeyIdGenerator.DatabaseDefinition;
import com.better517na.javaKeyIdGenerator.TableDefinition;
import com.feichuang.chineseWoodCarving.business.ICommentaryBusiness;
import com.feichuang.chineseWoodCarving.dao.ICommentaryDao;
import com.feichuang.chineseWoodCarving.model.MCommentary;

/**
 * TODO 添加类的一句话简单描述.
 * <p>
 * TODO 详细描述
 * <p>
 * TODO 示例代码
 * 
 * <pre>
 * </pre>
 * 
 * @author yanshu
 */
@Service("commentaryBusiness")
public class CommentaryBusinessImpl extends BaseBusinessImpl implements ICommentaryBusiness {
    /**
     * 
     */
    @Resource(name = "commentaryDao")
    private ICommentaryDao commentaryDao;

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean insertCommentary(MCommentary commentary) {
        commentary.setKeyId(keyIDFactory.NewKeyID(DatabaseDefinition.GJJPKRFinancialStatementDB, TableDefinition.GJJPKRFinancialStatementDB_KcpRelationshipAccountYYYY));
        return commentaryDao.insertCommentary(commentary);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public boolean deleteMCommentary(MCommentary commentary) {
        return commentaryDao.deleteMCommentary(commentary);
    }

    /**
     * {@inheritDoc}.
     */
    @Override
    public List<MCommentary> selectMCommentary(MCommentary commentary) {
        return commentaryDao.selectMCommentary(commentary);
    }

}
